<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>星启天订单查询</title>
    <link rel="icon" href="favicon.ico" type="image/x-icon"/>
<#include "../template/template_editPage.ftl">
<#include "../template/include/assign.ftl">
<#include "../template/include/source.ftl">
    <link href="${web_static}/admin/css/list.css" rel="stylesheet" type="text/css"/>
    <style type="text/css">
        .page {
            float: right;
            padding-top: 15px;
            margin-right: 15px;
        }
    </style>

</head>
<body class="list">
<script type="text/javascript">
    $().ready(function () {

        var $validateErrorContainer = $("#validateErrorContainer");
        var $validateErrorLabelContainer = $("#validateErrorContainer ul");
        var $validateForm = $("#inputForm");
        var $tab = $("#tab");
        // Tab效果
        $tab.tabs(".tabContent", {
            tabs:"input"
        });

        // 表单验证
        $validateForm.validate({
            errorContainer:$validateErrorContainer,
            errorLabelContainer:$validateErrorLabelContainer,
            wrapper:"li",
            errorClass:"validateError",
            ignoreTitle:true,
            rules:{
                "tranid":{
                    required:true
                },
                "merchantid":{
                    required:true
                }

            },
            messages:{
                "tranid":{
                    required:"请输入订单号!"
                },
                "merchantid":{
                    required:"请选择商户编号!"
                }

            },
            submitHandler:function (form) {
                //$(form).find(":submit").attr("disabled", true);
                form.submit();
            }
        });

    <#if actionErrors?? && (actionErrors?size > 0)>
        $.dialog({type:"warn", content:"<#list errorMessages as list>${list}<br></#list>",
            modal:true, autoCloseTime:3000});
    </#if>

    });


</script>
<div class="body">
    <div class="listBar">
        <h1><span class="icon">&nbsp;</span>星启天订单查询&nbsp;</h1>
    </div>
    <div style="display: none;" id="validateErrorContainer" class="validateErrorContainer">
        <div class="validateErrorTitle" id="validateErrorTitle">以下信息填写有误,请重新填写</div>
        <ul></ul>
    </div>
    <form id="inputForm" class="validate" action="${web_base}/game/xqt!orderQuery.htm" method="post">
        <div class="operateBar">
            <label>请输入:</label>
            商户编号：<select name="merchantid" id="merchantid" class="formText {required: true}">
            <option value="" >请选择...</option>
            <option value="104575" <#if (queryInfo.merchantid=="104575")!false>selected="selected" </#if>>
    			104575
			</option>
        </select>
            手拉手订单编号：<input type="text" id="tranid" name="tranid"
                           value="<#if queryInfo??>${(queryInfo.tranidValue)!}</#if>"
                           onkeyup="this.value=this.value.replace(/\D/g,'')"
                           onafterpaste="this.value=this.value.replace(/\D/g,'')"/>*
            <input type="submit" id="searchButton" class="addButton" value="查询"/>

        </div>
    </form>
    <table class="listTable">
            <#if queryInfo?? && queryInfo.errcode?? && queryInfo.errcode=="errcode">
                <tr>
                    <th>
                        <span class="sort" name="queryState">查询状态</span>
                    </th>
                    <th>
                        <span class="sort" name="errorMsg">错误描述</span>
                    </th>
                    <th>
                        <span class="sort" name="remark">备注信息</span>
                    </th>
                    <th>
                        <span class="sort" name="mark">商户自定义信息</span>
                    </th>
                </tr>
                <tr>
                    <td>
                        查询失败
                    </td>
                    <td>
                        ${(queryInfo.errmsgValue)!}
                    </td>
                    <td>
                        ${(queryInfo.remarkValue )!}
                    </td>
                    <td>
                        ${(queryInfo.markValue )!}
                    </td>
                </tr>
            <#elseif queryInfo?? && queryInfo.state?? && queryInfo.state=="State">
                <tr>
                    <th>
                        <span class="sort" name="State">订单充值状态</span>
                    </th>
                    <th>
                        <span class="sort" name="Exchange_no">51订单号</span>
                    </th>
                    <th>
                        <span class="sort" name="tranid">手拉手订单号</span>
                    </th>
                    <th>
                        <span class="sort" name="OrderMoney">面值订单金额(元)</span>
                    </th>
                    <th>
                        <span class="sort" name="payMoney">实际订单金额(元)</span>
                    </th>
                    <th>
                        <span class="sort" name="Remark">说明</span>
                    </th>
                    <th>
                        <span class="sort" name="mark">商户自定义信息</span>
                    </th>
                </tr>
                <tr>
                    <td>
                        <#if queryInfo?? && queryInfo.stateValue == "0">
                            订单正在处理中
                        <#elseif  queryInfo?? && queryInfo.stateValue == "1">
                            订单充值成功
                        <#elseif  queryInfo?? && queryInfo.stateValue == "2">
                            订单充值失败
                        </#if>
                    </td>
                    <td>
                         ${(queryInfo.exchange_noValue)!}
                    </td>
                    <td>
                        ${(queryInfo.tranidValue)!}
                    </td>
                    <td>
                        ${(queryInfo.orderMoneyValue)!}
                    </td>
                    <td>
                        ${(queryInfo.payMoneyValue)!}
                    </td>
                    <td>
                        ${(queryInfo.remarkValue)!}
                    </td>
                    <td>
                        ${(queryInfo.markValue)!}
                    </td>
                </tr>
                <#else>
                 <tr>
                    <th>
                        <span class="sort" name="State">订单充值状态</span>
                    </th>
                    <th>
                        <span class="sort" name="Exchange_no">51订单号</span>
                    </th>
                    <th>
                        <span class="sort" name="tranid">手拉手订单号</span>
                    </th>
                   <th>
                        <span class="sort" name="OrderMoney">面值订单金额(元)</span>
                    </th>
                    <th>
                        <span class="sort" name="payMoney">实际订单金额(元)</span>
                    </th>
                    <th>
                        <span class="sort" name="Remark">说明</span>
                    </th>
                    <th>
                        <span class="sort" name="mark">商户自定义信息</span>
                    </th>
                </tr>
            </#if>
    </table>
<#if !queryInfo??>
    <div class="noRecord">
        <span id="span"> 没有查询任何记录!</span>
    </div>
</#if>
</div>

</body>
</html>